package XuanZeJieGou;

import java.util.Scanner;

//switch case  switch匹配一个值。结束时用break
public class SwitchDemo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的成绩");
        String  grade =sc.next();
        switch (grade){
            case"A":
                System.out.println("优秀");
                break;
            case"B":
                System.out.println("良好");
                break;
            case"C":
                System.out.println("及格");
                break;
            case"D":
                System.out.println("再接再厉");
                break;
            case"E":
                System.out.println("挂科");
                break;
            default:
                System.out.println("未知");
        }
    }
}
